<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>新增代码</title>
  <%@ include file="/WEB-INF/include/include.jsp" %>
  <script type="text/javascript" src="<%=path %>/js/sysmgr/code/CodeEdit.js"></script>
  </head>
  <body>
  <div class="editpage-locked-content">
    <h2 class="editpage-lk-title" >新增代码</h2>
    <div class="editpage-lk-tbar" id="tbarWrap"></div>
  </div>
  <div class="editpage-content" >
    <div class="editpage-form" id="formWrap"></div>
  </div> 
  
  </body>
</html>

  <ui:page>
  
  <ui:toolbar id="toolbar"  renderTo="tbarWrap" >
    <x:items>
      <ui:button text="保存" iconCls='icon-save'  handler="CodeEdit.submitForm" scope="CodeEdit"   />
      <x:value>-</x:value>
      <ui:button text="取消" iconCls='icon-cancel' handler="CodeEdit.close" scope="CodeEdit" />
      <x:value>-</x:value>
    </x:items>
  </ui:toolbar>
  
  <ui:formPanel id="codeForm" width="600" renderTo="formWrap">
    <x:attr name="border" type="int">0</x:attr>
    <x:attr name="bodyPadding"  type="int" >5</x:attr>
    <x:attr name="fieldDefaults">
      <x:value>
        <x:attr name="labelAlign"  type="string" >right</x:attr>
      </x:value>
    </x:attr>
    <x:items>
      <x:value>
        <x:attr name="padding" type="string">2</x:attr>
        <x:attr name="layout">column</x:attr>
        <x:attr name="border" type="int" >0</x:attr>
        <x:attr name="items" type="array">
          <ui:formPanel.text id="CODE" fieldLabel="代码" allowBlank="false" />
        </x:attr>
      </x:value>
      <x:value>
        <x:attr name="padding" type="string">2</x:attr>
        <x:attr name="layout">column</x:attr>
        <x:attr name="border" type="int" >0</x:attr>
        <x:attr name="items" type="array">
          <ui:formPanel.text id="CODE_TEXT" fieldLabel="名称" allowBlank="false" />
        </x:attr>
      </x:value>      
      <x:value>
        <x:attr name="padding" type="string">2</x:attr>
        <x:attr name="layout">column</x:attr>
        <x:attr name="border" type="int" >0</x:attr>
        <x:attr name="items" type="array">
        <ui:formPanel.text id="CODE_ORDER" fieldLabel="排序" allowBlank="false" />
        <ui:formPanel.hidden id="CODE_DESC"  />
        <ui:formPanel.hidden id="CODE_TYPE"  />
        </x:attr>
      </x:value>    
    </x:items>
  </ui:formPanel>
  
  <x:bottomScript>
    Ext.getCmp("CODE_DESC").setValue(CodeEdit.codeDesc);
    Ext.getCmp("CODE_TYPE").setValue(CodeEdit.codeType);
  </x:bottomScript>
    
  </ui:page>

  
